﻿<%@ Page Title="" Language="C#" MasterPageFile="~/MasterPage.Master" AutoEventWireup="true" CodeBehind="AddFormation.aspx.cs" Inherits="UI.AddFormation" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>

<asp:Content ID="Content1" ContentPlaceHolderID="headPlaceHolder" runat="server">
    <title>Ajout Formation</title>
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="contentPlaceHolder" runat="server">
    <asp:FormView runat="server" ID="formAddFormation" DefaultMode="Insert">
        <InsertItemTemplate>
            <table width="100" id="formTable">
                <tr>
                    <td>
                        <asp:Label runat="server" Text="Nom de la formation" Width="200px" />
                    </td>
                    <td>
                        <asp:TextBox runat="server" ID="tbFormationName"  Width="250px" />
                        <asp:RequiredFieldValidator ControlToValidate="tbFormationName" ErrorMessage="*" BackColor="Red" Display="Dynamic" runat="server" Text="*" />
                    </td>
                </tr>
                <tr>
                    <td>
                        <asp:Label runat="server" Text="Référence" Width="200px" />
                    </td>
                    <td>
                        <asp:TextBox runat="server" ID="tbFormationReference"  Width="250px" />
                        <asp:RequiredFieldValidator ID="RequiredFieldValidator1" ControlToValidate="tbFormationReference" ErrorMessage="*" BackColor="Red" Display="Dynamic" runat="server" Text="*" />
                    </td>
                </tr><tr>
                    <td>
                        <asp:Label runat="server" Text="Theme" Width="200px" />
                    </td>
                    <td>
                        <asp:TextBox ID="tbFormationTheme" runat="server" Width="250px"  />
                        <asp:RequiredFieldValidator ID="RequiredFieldValidator2" ControlToValidate="tbFormationTheme" ErrorMessage="*" BackColor="Red" Display="Dynamic" runat="server" Text="*" />
                        <asp:AutoCompleteExtender ID="AutoCompleteExtender1" 
                        runat="server" 
                        TargetControlID="tbFormationTheme" 
                        ServiceMethod="GetCompletionList" 
                        ServicePath="~/wsTheme.asmx"
                        MinimumPrefixLength="1" Enabled="true" CompletionInterval="0" >
                        </asp:AutoCompleteExtender>
                        <asp:Label ID="errorMsgTheme" runat="server" Visible="false" BackColor="Red" Font-Italic="true" Text="Theme introuvable, veuillez attendre l'autocompletion apparaitre, ou recommencer, merci." />
                    </td>
                </tr><tr>
                    <td>
                        <asp:Label runat="server" Text="Nombre de jours" Width="200px" />
                    </td>
                    <td>
                        <asp:TextBox runat="server" ID="tbFormationsNbDeJours"  Width="250px" />
                        <asp:RequiredFieldValidator ID="RequiredFieldValidator3" ControlToValidate="tbFormationsNbDeJours" ErrorMessage="*" BackColor="Red" Display="Dynamic" runat="server" Text="*" />
                        <asp:RangeValidator ControlToValidate="tbFormationsNbDeJours" MinimumValue="0" MaximumValue="99999" runat="server" Display="Dynamic" Text="La valeur doit etre un entier!" ErrorMessage="*" BackColor="Red" />
                    </td>
                </tr><tr>
                    <td valign="top">
                        <asp:Label runat="server" Text="Description" Width="200px" />
                    </td>
                    <td>
                        <asp:TextBox runat="server" ID="tbDescription" TextMode="MultiLine" Rows="5"  Width="250px" />
                        <asp:RequiredFieldValidator ID="RequiredFieldValidator4" ControlToValidate="tbDescription" ErrorMessage="*" BackColor="Red" Display="Dynamic" runat="server" Text="*" />
                    </td>
                </tr><tr>
                    <td>
                        
                    </td>
                    <td >
                        <asp:Button ID="bttCancel" runat="server" Text="Annuler" Width="75px" CausesValidation="false" OnClick="bttCancel_OnClick"  />
                        <asp:Button ID="bttAdd" runat="server" Text="Ajouter" Width="75px" OnClick="bttAdd_OnClick" />
                    </td>
                </tr>
            </table>
        </InsertItemTemplate>
    </asp:FormView>
</asp:Content>
